<%@ page import="com.bookshop.service.BookService" %>
<%@ page import="com.bookshop.service.impl.BookServiceImpl" %>
<%@ page import="com.bookshop.entity.Book" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/5/24
  Time: 10:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--模拟控制器 --%>
 <%
  BookService bookService =new BookServiceImpl();
  List<Book> books = bookService.findBooksByCount(16);
  //将查询到的图书列表存储在request作用域
  request.setAttribute("books",books);
  //跳转到图书首页
  request.getRequestDispatcher("index.jsp").forward(request,response);

 %>